package com.daniele;

import com.daniel.util.HibernateUtil;

import org.hibernate.Session;

import com.daniel.dao.Admin;
import com.daniel.dao.AdminDao;

public class App1 {
	public static void main(String[] args) {
		
		
		
		System.out.println("Maven + Hibernate + Oracle");
		Session session = HibernateUtil.getSessionFactory().openSession();
		
		AdminDao dao = new AdminDao();
		
		session.beginTransaction();
		Admin admin = new Admin();
 
		admin.setAdmin_id(345);
		admin.setGroupeamdin(6765);		
		
		
        
		session.save(admin);
		session.getTransaction().commit();
	}
}